<%@ page import="MyBean.patient" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">a {text-decoration: none}</style>
</head>
<body>
<% request.setCharacterEncoding("utf-8");
patient patient1 = (patient)request.getAttribute("patient2");
%>
<hr>
<center>
<h1>
<font size="3" color="red">田园住院系统</font>
<font size="3" color="purple">查询界面</font>
</h1>
</center>
<hr>
<br><br>
<table border="1" align="center">
<tr>
<th>住院号</th><th>病人姓名</th><th>性别</th><th>年龄</th><th>身份证号</th><th>手机号码</th><th>病床号</th><th>住院时间</th><th>出院时间</th><th>操作1</th><th>操作2</th>
</tr>
<% if(patient1.getEndTime()== null)
		{%>
		<tr>
		<th><%=patient1.getAdmissionNumber() %></th><th><%=patient1.getPatientName() %></th><th><%=patient1.getSex() %></th><th><%=patient1.getAge() %></th><th><%=patient1.getPatientNumber() %></th><th><%=patient1.getPhone() %></th><th><%=patient1.getRoomno() %></th><th><%=patient1.getStartTime() %></th><th>未出院</th>
		<th><a href="deletePatient?number=<%=patient1.getAdmissionNumber() %>">删除</a></th>
		<th><a href="javascript:location.href=encodeURI('updatePatient.jsp?admissionNumber=<%=patient1.getAdmissionNumber() %>&patientName=<%=patient1.getPatientName() %>&sex=<%=patient1.getSex() %>&age=<%=patient1.getAge() %>&patientNumber=<%=patient1.getPatientNumber() %>&phone=<%=patient1.getPhone() %>&roomno=<%=patient1.getRoomno() %>&startTime=<%=patient1.getStartTime() %>&endTime=')">更新</a></th>
		</tr>
		<%}else{%>
		<tr><th><%=patient1.getAdmissionNumber() %></th><th><%=patient1.getPatientName() %></th><th><%=patient1.getSex() %></th><th><%=patient1.getAge() %></th><th><%=patient1.getPatientNumber() %></th><th><%=patient1.getPhone() %></th><th><%=patient1.getRoomno() %></th><th><%=patient1.getStartTime() %></th><th><%=patient1.getEndTime() %></th>
		<th colspan="2">已出院,不可更改</th></tr>
		<%}%>
<tr><th colspan="11" align="center"><a href="index.jsp">返回主页面</a></th></tr>
</table>
<br>
<hr>
<center><em><p style="background:yellow">Copyright &copy; 2020 TianYuan Web Hospital,Nuc.<h1></em></center>
</body>
</html>